import {Random} from 'mockjs'

Random.extend({
    randomIcons: function (){
        const randomIcons = ['https://img95.699pic.com/xsj/3c/cl/5b.jpg%21/fh/300',
            'https://img0.baidu.com/it/u=3901984883,218802812&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
            'https://img0.baidu.com/it/u=3901984883,218802812&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
            'https://img0.baidu.com/it/u=2798189130,3847464441&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=501',
            'https://img0.baidu.com/it/u=3901984883,218802812&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
            'https://img0.baidu.com/it/u=3901984883,218802812&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500']
        return this.pick(randomIcons)
    }
})
module.exports = [{
    url: '/mock/sys/listSettings',
    method: 'post',
    response: () => {
        return {
            code: 200,
            'data|4': [{
                'id|+5': 234532,
                title: '@cword(3,7)',
                'children|10': [{
                    'id|+11': 12131,
                    title: '@cword(7,20)',
                    content: '@csentence()',
                    // icon: ('@randomImgs()'),
                    component:['small','medium','large'],
                    icon: Random.image('200x200',  '#50B347', '#FFF','ICON')
                }]
            }],
            msg: 'ok'
        }
    }
}]
